package com.yuan.sys.modular.driver.param;

import com.yuan.core.pojo.base.param.BaseParam;
import com.yuan.sys.core.consts.PatternRegex;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author hongawen
 * @version 1.0.0
 * @date 2021年10月21日 22:12
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class SysDriverParam extends BaseParam {


    /**
     * 主键
     */
    @NotNull(message = "id不能为空，请检查id参数",
            groups = {edit.class, delete.class, detail.class, start.class,
                    stop.class,  updateInfo.class, updateAvatar.class})
    private Long driverIndex;


    /**
     * 驾驶员姓名
     */
    @NotBlank(message = "驾驶员姓名不能为空，请检查employeeName参数", groups = {add.class, edit.class})
    private String employeeName;

    /**
     * 驾驶员工号
     */
    @NotBlank(message = "驾驶员工号不能为空，请检查employeeCode参数", groups = {add.class, edit.class})
    private String employeeCode;

    /**
     * 性别(字典 1男 2女 3未知)
     */
    @NotNull(message = "性别不能为空，请检查sex参数", groups = {add.class, edit.class})
    private Integer sex;

    /**
     * 年龄
     */
    private Integer age;

    /**
     * 身份证
     */
    @NotBlank(message = "身份证号不能为空，请检查idCard参数", groups = {add.class, edit.class})
    private String idCard;

    /**
     * 手机
     */
    @Pattern(regexp =PatternRegex.PHONE_REGEX ,message = "手机号非法")
    private String phone;


    /**
     * 备用手机
     */
    private String backupPhone;

    /**
     * 类型
     */
    @NotNull(message = "类型不能为空，请检查type参数", groups = {add.class, edit.class})
    private Integer type;


    /**
     * 状态
     */
    private Integer status;

}
